package cn.iocoder.yudao.module.biz.controller.admin.expand.view.service.impl;


import cn.iocoder.yudao.module.biz.controller.admin.contract.vo.ContractArchivePageReqVO;
import cn.iocoder.yudao.module.biz.controller.admin.contract.vo.ContractArchiveRespVO;
import cn.iocoder.yudao.module.biz.controller.admin.receivables.domain.SanBizContractArchiveReceiveRecord;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.iocoder.yudao.module.biz.controller.admin.expand.view.domain.SanBizExpandRecordView;
import cn.iocoder.yudao.module.biz.controller.admin.expand.view.service.SanBizExpandRecordViewService;
import cn.iocoder.yudao.module.biz.controller.admin.expand.view.mapper.SanBizExpandRecordViewMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


/**
* @author 王兴鹏
* @description 针对(大屏拓展记录查询)】的操作Service实现
* @createDate 2025-09-04 15:31:15
*/
@Service
public class SanBizExpandRecordViewServiceImpl extends ServiceImpl<SanBizExpandRecordViewMapper, SanBizExpandRecordView>
    implements SanBizExpandRecordViewService{

    @Autowired
    private SanBizExpandRecordViewMapper mapper;

    @Override
    public IPage<SanBizExpandRecordView> getPage(SanBizExpandRecordView pageReqVO) {
        IPage<SanBizExpandRecordView> pageResult = new Page<>();
        pageResult.setRecords(mapper.getPage(pageReqVO));
        pageResult.setTotal(mapper.getCount(pageReqVO));
        pageResult.setSize(pageReqVO.getPageSize());
        pageResult.setCurrent(pageReqVO.getPageNo());
        return pageResult;
    }

    @Override
    public Map<String, Object> getCountSum(String month) {
        return mapper.getCountSum(month);
    }

    @Override
    public IPage<ContractArchiveRespVO> getContractArchiveViewList(ContractArchivePageReqVO pageReqVO) {
        IPage<ContractArchiveRespVO> pageResult = new Page<>();
        pageResult.setRecords(mapper.getContractArchiveViewList(pageReqVO));
        pageResult.setTotal(mapper.getContractArchiveViewTotalList(pageReqVO));
        pageResult.setSize(pageReqVO.getPageSize());
        pageResult.setCurrent(pageReqVO.getPageNo());
        return pageResult;
    }

    @Override
    public IPage<SanBizContractArchiveReceiveRecord> getContractReceiveRecordViewList(SanBizContractArchiveReceiveRecord pageReqVO) {
        IPage<SanBizContractArchiveReceiveRecord> pageResult = new Page<>();
        pageResult.setRecords(mapper.getContractReceiveRecordViewList(pageReqVO));
        pageResult.setTotal(mapper.getContractReceiveRecordViewTotalList(pageReqVO));
        pageResult.setSize(pageReqVO.getPageSize());
        pageResult.setCurrent(pageReqVO.getPageNo());
        return pageResult;
    }

    @Override
    public List<Map<String, Object>> getTotalAmount(String year) {
        return mapper.getTotalAmount(year);
    }
}




